package pizza.admin.dao;
import java.util.Collection;

import pizza.admin.entity.User;


/**
 * @author George Dailiev <george.dailiev@gmail.com>
 * @version 1.0
 */
public interface UserDAOInterface {
	
	/**
	 * @param 
	 */
	public void initializeEntityManager();
	
	/**
	 * @param id number
	 * @return User Entity representing the user object
	 */
	public User getById(Integer id);
	
	
	/**
	 * @param username 
	 * @param password
	 * @param isAdminLogin if we try to log in admin panel
	 * @return User object
	 */
	public User login(String username, String password, Boolean isAdminLogin);
	
	
	/**
	 * @return collection of all users
	 */
	public Collection<User> getAll();
	
	
	/**
	 * @param username
	 * @param id - the id of current user
	 * @return true if username is unique
	 */
	public Boolean checkUniqueUserName(String username,Integer id);
	
	/**
	 * @param user
	 * @return add user to database
	 */
	public void add(User user);
	
	/**
	 * @param user
	 */
	public void edit(User user);
	
	/**
	 * @param user
	 */
	public void delete(User user);
	
	/**
	 * 
	 */
	public void destroy();
}
